home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
UpTime Volume 1 #8
/
utv1n8s1.d64
/
computer squares
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-28
|
13KB
|
380 lines
10 ifpeek(40704)<>165thenpoke56,127:clr:load"0:draw",8,1
15 clr:sys 65418:poke 808,234
20 goto 505
25 fc=6:syspp
26 print"[147] [195]omputer [211]quares plays like the"
27 print"popular [212].[214]. game show, "chr$(34)"[200][207][204][204][217][215][207][207][196]"
28 print"[211][209][213][193][210][197][211]"chr$(34)", which is a tic-tac-toe trivia game.
30 [153]" (NULL)ine celebrities sit in the tic-tac-"
32 [153]"toe grid. (NULL)ou pick the celebrity you"
34 [153]"want, the host will ask him a question"
36 [153]"and they will give an answer. right$t is up"
38 [153]"to you to decide if the question has"
40 [153]"been answered truthfully or not. right$f you";
42 [153]"are right your mark (either (NULL) or (NULL)) is"
44 [153]"placed in that square. right$f you are wrong";
46 [153]"your opponent will have their mark"
48 [153]"placed in that square."
49 [141] 400
50 [153]"load(NULL)(NULL)valatn(NULL)val (NULL)(NULL)(NULL)val: (NULL)he only time your"
52 [153]"opponent's mark is not placed in your"
54 [153]"square is when this would cause him to"
55 [153]"win the game. (NULL)his square must be"
56 [153]"earned by picking it on their turn."
58 [153]"(NULL)wo rounds are played (three if you are"
60 [153]"tied). (NULL)ou win $500 per round and the"
62 [153]"grand winner gets to try and win a car."
64 [141] 400
67 [153]"load (NULL)(NULL)atn(NULL)right$(NULL)chr$ len(NULL)(NULL)(NULL)(NULL)(NULL)val(NULL) (NULL)(NULL)(NULL)atn(NULL)val(NULL)..."
69 [153]" (NULL)imply follow the screen prompts to"
72 [153]"play. (NULL)ost prompts require you to press";
74 [153]"one key; others require you to press"
76 [153]"the (NULL)val(NULL)(NULL)(NULL)(NULL) key after your selection."
80 [153]"(NULL)hen you are asked '(NULL)left$atn(NULL) (NULL)(NULL)val(NULL)(NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)(NULL)"
82 [153]"(NULL)atn(NULL)(NULL) (NULL)(NULL) (NULL)(NULL)val' press (NULL)val(NULL)(NULL)(NULL)(NULL) for the"
84 [153]"standard set of questions. right$f you have"
86 [153]"created your own question file with
88 print"'[209][213][197][211][212][201][207][206] [205][193][203][197][210]', then enter that file's";
89 print"name and press return."
90 print" [201]f you are playing a solitaire game"
92 print"you can choose from among 3 computer"
94 print"players. [212]he higher the number, the"
96 print"smarter the player."
100 poke198,0:print"[154] [208]ress [211][208][193][195][197][194][193][210] to start"
110 gety$:ify$<>" "then110
115 fc=7:syspp
120 return
400 print"[154] [208]ress [211][208][193][195][197][194][193][210] to continue.";:poke198,0
410 gety$:ify$<>" "then410
420 return
505 s=54272:fort=stos+24:poket,0:next:pokes+24,15
510 rd=0:pp=40704:pn$="title":la=32768:fc=0:syspp:print"[147]"
515 fc=1:syspp:fc=2:syspp
520 pokes+2,255:pokes+3,7:pokes+5,9:pokes+6,0
525 fory=1to10:pokes+1,18:pokes,104:pokes+4,65:foru=1to100:nextu:pokes+4,64
530 pokes+1,20:pokes,104:pokes+4,65:foru=1to100:nextu:pokes+4,64
535 pokes+1,22:pokes,104:pokes+4,65:foru=1to100:nextu:pokes+4,64
540 pokes+3,y:nexty
545 forw=830to945:reade:pokew,e:next
550 data169,2,162,176,160,3,32,189,255,169,1,162,8,160,0,32,186,255,32,192
555 data255,24,162,1,32,198,255,176,75,32,207,255,32,207,255,169,13,32,210,255
560 data32,207,255,32,207,255,32,207,255,133,252,32,207,255,133,251,165,144
565 data208,44,165,251,166,252,32,205,189,169,32,32,210,255,32,207,255,32,210
570 data255,174,141,2,208,251,166,145,224,127,240,15,32,207,255,105,0,208,235
575 data169,13,32,210,255,76,102,3,24,169,1,32,195,255,32,204,255,96,36,48
577 gosub 2500
578 get a$:if a$="y" then gosub 25:goto581
579 if a$="[140]" then 2600
580 if a$<>"n" then 578
581 poke198,0:print"[147]"tab(11)"[207]ne player or two?"
582 printtab(13)"([197]nter 1 or 2)"
585 geta$:ifa$<"1"ora$>"2" and a$<>"[140]" then585
587 if a$="[140]" then 2600
590 ifa$="2"then615
592 a4=val(a$)
595 poke198,0:printtab(8)"[145][145][193]re you male or female?"
597 printtab(13)"([197]nter [205] or [198])"
600 getb3$
601 if b3$="[140]" then 2600
603 if b3$<>"m" and b3$<>"f" then 600
605 se$="screen1":ifb3$="f"thense$="screen3"
610 goto650
615 printtab(10)"[145][145][193]re the two players:"
620 printtab(5)"1-[205]ale & [198]emale 2-[205]ale & [205]ale"
625 print" 3-[198]emale & [198]emale ([197]nter 1, 2 or 3)";:poke198,0
630 geta7$:ifa7$="1"thense$="screen1":goto650
633 if a7$="[140]" then 2600
635 ifa7$="2"thense$="screen2":goto650
640 ifa7$="3"thense$="screen3":goto650
645 goto630
650 fort=1to500:next:print"[147]"
655 pn$=se$:fc=1:syspp:fc=2:syspp:r1=rd:r2=la
660 pn$="car":fc=1:syspp:rd=r2
665 dimb(9):dima$(199):dimr(49)
670 nn=-1
675 l1$="[147][144]":printl1$"[215]hat is player one's name?"
676 print">";:gosub2000:n1$=t$
680 ifa4<>1then715
685 poke198,0
690 printl1$tab(8)"[156][215]ho do you want to play?"
692 printtab(7)"1) [205]ary 2) [208]at 3) [211]hanna[144]
695 [161]q1$:[139]q1$[178]"1"[167]n2$[178]"(NULL)ary":[137]720
700 [139]q1$[178]"2"[167]n2$[178]"(NULL)at":[137]720
705 [139]q1$[178]"3"[167]n2$[178]"(NULL)hanna":[137]720
706 [139] q1$[178]"restore" [167] 2600
710 [137]695
715 [153]l1$"(NULL)hat is player two's name?":[153]">";:[141]2000:n2$[178]t$
720 [153]l1$" (NULL)hat questions do you want to use?"
725 [153]" valnter questions name or (NULL)val(NULL)(NULL)(NULL)(NULL) for
730 print" regular questions":tt=1:t1=1:t2=2:m1=0:m2=0
732 print">";:gosub 2000:b$=t$:if b$="" then b$="q"
735 print"[147]"tab(15)"[200]ang on...":printtab(11)"[199]etting loaded..."
742 open 15,8,15,"i0"
745 open3,8,3,"0:"+b$:input#15,er:close3:close15:ifer<20then755
750 printl1$"[196][201][211][203] [197][210][210][207][210]!!!. [212]ry again.":forxx=1to3000:next:goto720
755 fc=6:syspp:open3,8,3,"0:"+b$
760 forb=0to199
765 input#3,a$(b):next
770 close3:fc=6:syspp
775 printl1$tab(7)"[205]ixing up the questions..."
780 forp=0to49:r(p)=p:next:x=ti:z=ti
785 op=peek(162):forp=1toop:z=int(rnd(ti)*50):x=int(rnd(ti)*50)
790 r=r(x):r(x)=r(z):r(z)=r:next
795 printl1$tab(6)"[207].[203]., player one you start.":tu=1
800 iftu=1thenprint" "n1$", pick a square for your [216]."
805 iftu=2anda4=1then1170
810 iftu=2thenprint" "n2$", pick a square for your [207]."
815 nn=nn+1:ifnn=49thennn=1
820 poke198,0
825 getg$:ifg$<"1"org$>"9"and g$<>"[140]" then825
827 if g$="[140]" then 2600
830 g=val(g$)
835 ifb(g)<>0thenprintl1$tab(5)"[211]orry, that one has been used.":goto800
840 printl1$tab(7)"[206]umber"g" the question is:"
845 print" "a$(r(nn)*4):forxx=1to5:gosub1760:next
850 ifa$(r(nn)*4+3)<>"+"thenprintl1$" "a$(r(nn)*4+3):forx=1to1000:next
855 ifa$(r(nn)*4+3)<>"+"thenprint" just kidding....[144]":forx=1to1500:next
860 mn=int(rnd(1)*2):printl1$" [201]'ll say..."a$(r(nn)*4+1+mn)
865 printtab(4)"[144][215]ell, do you agree, disagree or"
870 print" want the question repeated? ([193]/[196]/[210])";:poke198,0
875 iftu=2anda4=1then1320
880 gete$
885 ife$="a"then925
890 ife$="d"then935
895 ife$="r"then905
897 if e$="[140]" then 2600
900 goto880
905 printl1$" [212]he question was:":print" "a$(r(nn)*4):forex=1to5:gosub1760:next
910 forex=1to50:next
915 printl1$" [212]he answer was: "a$(r(nn)*4+1+mn):forxx=1to5:gosub1760:next
920 goto865
925 ifmn=0thengosub1735:goto1030
930 goto940
935 ifmn=1thengosub1735:goto1125
940 gosub1720:printl1$" [211]orry, "a$(r(nn)*4+1):print" is the correct answer."
945 fory=1to2000:next
950 b(g)=3:zn=1:iftu=1thenzn=2
955 k1=zn:k2=zn:k3=3:gosub1625:ifwi=9then1005
960 k1=zn:k2=3:k3=zn:gosub1625:ifwi=9then1005
965 k1=3:k2=zn:k3=zn:gosub1625:ifwi=9then1005
970 iftu=1thenprintl1$tab(11)"[207] gets the square.":b(g)=2:gosub1770:goto980
975 printl1$tab(11)"[216] gets the square.":b(g)=1:gosub1780
980 fore=1to1500:next
985 gosub1060:pr$="x":iftu=1thenpr$="o"
990 fc=4:syspp:fc=5:syspp:fore=1to3000:next
995 gosub1670:ifwi=8orwi=7thengosub1370:goto1435
1000 goto1155
1005 iftu=1thenprintl1$tab(10)"[195]an't put an [207] there":printn2$
1010 iftu=1thenprinttab(4)"[217]ou'll have to earn that square":goto1025
1015 printl1$tab(10)"[195]an't put an [216] there":printtab(20-len(n1$)/2)n1$
1020 printtab(4)"[217]ou'll have to earn that square."
1025 forxx=1to3000:next:b(g)=0:go